package com.vhall.component.plugin.common.utils;

import java.security.SecureRandom;

/**
 * @author dalong
 * @date 2021-04-29 10:28
 */
public class RandomUtil {

    private RandomUtil() {
        throw new IllegalStateException("Utility class");
    }

    /**
     * 生成随机数字
     *
     * @param min 最小值
     * @param max 最大值
     * @return
     */
    public static Integer getRandomNum(Integer min, Integer max) {
        return new SecureRandom().nextInt(max - min + 1) + min;
    }
}
